﻿using UnityEngine;

namespace DiIoc.Signal.ObserverPattern
{
    public class PrintObserver : Observer
    {
        public PrintObserver(Subject subject)
        {
            this.subject = subject;
            subject.AttachObserver(this);
        }
        public override void Update()
        {
            Debug.Log($"PrintObserver received a message: {subject.State}, the message has been printed");
        }
    }
}
